package com.bl.wxhook.service;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import org.springframework.stereotype.Component;

/**
 * @author Tao
 * @date 2025/2/12
 */
@Component
public class WeChatApiService {

    public boolean checkLogin() {
        String result = HttpUtil.post("http://127.0.0.1:19088/api/?type=0", (String) null);
        JSONObject jsonObject = new JSONObject(result);
        String code = jsonObject.getStr("code");
        return "1".equals(code);
    }
}
